using SeataNet.Core.Common;

namespace SeataNet.Core.Model
{
    /// <summary>
    /// 分支事务状态上报请求
    /// </summary>
    public class BranchReportRequest
    {
        /// <summary>
        /// 全局事务ID
        /// </summary>
        public string Xid { get; set; } = string.Empty;

        /// <summary>
        /// 分支事务ID
        /// </summary>
        public long BranchId { get; set; }

        /// <summary>
        /// 分支事务类型
        /// </summary>
        public string BranchType { get; set; } = string.Empty;

        /// <summary>
        /// 分支状态
        /// </summary>
        public BranchStatus Status { get; set; }

        /// <summary>
        /// 应用数据
        /// </summary>
        public string? ApplicationData { get; set; }

        /// <summary>
        /// 资源ID
        /// </summary>
        public string? ResourceId { get; set; }
    }
}
